package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type DzxRouter struct {
}

// InitDzxRouter 初始化 Dzx 路由信息
func (s *DzxRouter) InitDzxRouter(Router *gin.RouterGroup) {
	dzxRouter := Router.Group("dzx").Use(middleware.OperationRecord())
	dzxRouterWithoutRecord := Router.Group("dzx")
	var dzxApi = v1.ApiGroupApp.AutoCodeApiGroup.DzxApi
	{
		dzxRouter.POST("createDzx", dzxApi.CreateDzx)             // 新建Dzx
		dzxRouter.DELETE("deleteDzx", dzxApi.DeleteDzx)           // 删除Dzx
		dzxRouter.DELETE("deleteDzxByIds", dzxApi.DeleteDzxByIds) // 批量删除Dzx
		dzxRouter.PUT("updateDzx", dzxApi.UpdateDzx)              // 更新Dzx
	}
	{
		dzxRouterWithoutRecord.GET("findDzx", dzxApi.FindDzx)       // 根据ID获取Dzx
		dzxRouterWithoutRecord.GET("getDzxList", dzxApi.GetDzxList) // 获取Dzx列表
	}
}
